package xiangMu.car;

public abstract class Auto {  //汽车类
    private String carNumber;   //车牌号
    private String brand;
    private int dayRent;    //日租金
    private int seatNumber;  //座位数
    private boolean state;  //车辆租状态，false为在出租状态
    private int record = 0;   //车辆租赁次数

    public Auto() { //无参构造方法
    }

    public Auto(String carNumber, String brand, int dayRent, int seatNumber, boolean state, int record) {
        this.carNumber = carNumber;
        this.brand = brand;
        this.dayRent = dayRent;
        this.seatNumber = seatNumber;
        this.state = state;
        this.record = record;
    }

    public abstract double calcRent(int days);  //抽象方法，计算总租金

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getDayRent() {
        return dayRent;
    }

    public void setDayRent(int dayRent) {
        this.dayRent = dayRent;
    }

    public int getSeatNumber() {
        return seatNumber;
    }

    public void setSeatNumber(int seatNumber) {
        this.seatNumber = seatNumber;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    public int getRecord() {
        return record;
    }

    public void setRecord(int record) {
        this.record = record;
    }
}

